<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%@page import="com.sentiment.config.Config" %>

<!DOCTYPE html>
        <!--图表与统计-->
<html>
<head>
    <title>舆情监测与盗版分析</title>
    <meta http-equiv="content-type" charset="utf-8">
    <meta name="viewpoint" content="width=device-width,initial-scale=1.0">
<%String rlPath = Config.relativePath;String absPath = Config.projectRootPath;%>
    <link href="<%=rlPath%>/WebPage/css/bootstrap.css" rel="stylesheet">
    <link href="<%=rlPath%>/WebPage/css/mycss.css" rel="stylesheet">
    <link href="<%=rlPath%>/WebPage/css/landing-page.css" rel="stylesheet">
    <script src="<%=rlPath%>/WebPage/js/jquery-1.11.1.min.js"></script>
    <script src="<%=rlPath%>/WebPage/js/bootstrap.js"></script>
    <script src="<%=rlPath%>/WebPage/js/Chart.js"></script>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="<%=rlPath%>/WebPage/js/highcharts.js"></script>
</head>
<body class="mybackgroundcolor">
<!-- 导航栏 -->
<nav class="navbar navbar-default navbar-fixed-top topnav" role="navigation">
    <div class="container topnav">
        <div class="navbar-header">
            <a class="navbar-brand topnav" href="<%=rlPath%>/index.jsp">舆情监测与盗版分析</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <shiro:guest>            
                <li><a href="<%=rlPath%>/login.jsp">登录</a></li>
				<li><a href="<%=rlPath%>/WebPage/jsp/register.jsp">注册</a></li>
				</shiro:guest>
				<shiro:user>
					<li><a href="<%=rlPath%>/WebManagement/user.jsp"><shiro:principal property="username"/></a></li>
					<li><a href="<%=rlPath%>/logout.jsp">退出</a></li>
				</shiro:user>
				<shiro:hasAnyRoles name="admin">
					<li><a href="<%=rlPath%>/WebManagement/index.jsp">管理员界面</a></li>
				</shiro:hasAnyRoles>
				<li><a href="<%=rlPath%>/index.jsp">首页</a></li><!--下拉菜单-->
                <li >
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="dropMenu2">舆情监测<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropMenu2">
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/hotInfoSupervision.jsp">热点信息监督</a>
                        </li>
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/correlationInfo.jsp">关联信息查询</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="dropMenu3">盗版监测<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropMenu3">
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/plagiarismText.jsp">文本检测</a>
                        </li>
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/plagiarismUrl.jsp">URL检测</a>
                        </li>
                        
                    </ul>
                </li>
                <li >
                    <a href="" class="dropdown-toggle" data-toggle="dropdown" id="dropMenu4">舆情报告<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropMenu4">
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/dailySentiment.jsp">每日舆情报告</a>
                        </li>
                        <li role="presentation">
                            <a role="menuitem" href="<%=rlPath%>/WebPage/jsp/hotSentiment.jsp">热点舆情报告</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>
<!--按钮组-->
<div class="container">
<div class="row">
<div class="col-md-2">
<div class="btn-group-vertical btn-group-lg nottop">
    <button type="button" class="btn btn-default" style="width:150px;height:auto" id="searchList">搜索结果列表</button>
    <button type="button" class="btn btn-default" style="width:150px;height:auto" id="graph">图表与统计信息</button>
</div>
</div>
<!--中央面板-->
<div class="col-md-10">
<div class="panel panel-default panelsize">
    <div class="panel-heading">
        <h3 class="panel-title">
           图表展示结果
        </h3>
    </div>
    <div class="panel-body ">
        <div id="mediaRatio"></div>
        <script language="JavaScript">
            $(document).ready(function() {
                var chart = {
                    plotBackgroundColor: null,
                    plotBorderWidth: null,
                    plotShadow: false
                };
                var title = {
                    text: '页面来源分析'
                };
                var tooltip = {
                    pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
                };
				var credits = {
                    enabled: false
                };
                var plotOptions = {
                    pie: {
                        allowPointSelect: true,
                        cursor: 'pointer',
                        dataLabels: {
                            enabled: true,
                            format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                            style: {
                                color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                            }
                        }
                    }
                };
                var series= [{
                    type: 'pie',
                    name: 'Browser share',
                    data: [
                        ['微博',   500],
                        ['豆瓣',   400],
                        ['新闻门户',    300],
                        {
                            name: '论坛',
                            y: 300,
                            sliced: true,
                            selected: true
                        },
                        ['微信',    100],
                    ]
                }];

                var json = {};
                json.chart = chart;
                json.title = title;
                json.tooltip = tooltip;
                json.series = series;
                json.plotOptions = plotOptions;
				json.credits = credits;
                $('#mediaRatio').highcharts(json);
				
				
				var chart = {
                    type: 'column'
                };
                var title = {
                    text: '来源网站统计'
                };
                var xAxis = {
                    categories: ['新浪微博','豆瓣','人民网','搜狐','雅虎','网易','凤凰网'],
                    crosshair: true
                };
                var yAxis = {
                    min: 0,
                    title: {
                        text: '量 (条)'
                    }
                };
                var tooltip = {
                    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                    '<td style="padding:0"><b>{point.y:.1f} 条</b></td></tr>',
                    footerFormat: '</table>',
                    shared: true,
                    useHTML: true
                };
                var plotOptions = {
                    column: {
                        pointPadding: 0.2,
                        borderWidth: 0
                    }
                };

                var series= [{
                    name: '评论量',
                    data: [65,59,90,81,56,55,40]
                }, {
                    name: '转发量',
                    data: [28,40, 40, 19, 96,27,100]
                }];

                var json = {};
                json.chart = chart;
                json.title = title;
                json.tooltip = tooltip;
                json.xAxis = xAxis;
                json.yAxis = yAxis;
                json.series = series;
                json.plotOptions = plotOptions;
                json.credits = credits;
                $('#reprintRatio').highcharts(json);
            });
        </script>

        <hr class="intro-divider">
        <br/><br/>
        <div id="reprintRatio" ></div>
    </div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
	$("#searchList").click(function(){
		location.href="<%=rlPath%>/WebPage/jsp/plagiarismList.jsp";
		
	});
	$("#graph").click(function(){
		location.href="<%=rlPath%>/WebPage/jsp/plagiarismGraph.jsp";
	});
});
</script>
<!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <p class="copyright text-muted small">Copyright@四川雷克斯安防科技有限公司，电话TEL:(86-28) 6555 4013  FAX:（86-28）6662 7439地址：成都市武侯区神仙树西路3号2）</p>
                </div>
            </div>
        </div>
    </footer></body>

</html>
